// 商城管理接口
import $http from "./request";

// 查询商品分类
export function getGoodsTypeLists(data = {}) {
  return $http.request({
    url: "IShop/goodsTypeLists",
    method: "POST",
    header: {
      "Content-Type": "application/json",
    },
    data,
  });
}
// 根据分类Id查询商品
export function getGoodsByTypeId(data = {}) {
  return $http.request({
    url: "IShop/getGoodsByTypeId",
    method: "POST",
    header: {
      "Content-Type": "application/json",
    },
    data,
  });
}
// 根据商品Id查询商品
export function getGoodsById(data = {}) {
  return $http.request({
    url: "IShop/getGoodsById",
    method: "POST",
    header: {
      "Content-Type": "application/json",
    },
    data,
  });
}

// 生成订单
export function createOrder(data = {}) {
  return $http.request({
    url: "IShop/createOrder",
    method: "POST",
    header: {
      "Content-Type": "application/json",
    },
    data,
  });
}
